<!DOCTYPE html>
<html lang="zh-cn">
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
	<title>{php if(isset($title)) $_W['page']['title'] = $title}{if !empty($_W['page']['title'])}{$_W['page']['title']} - {/if}{if !empty($_W['account']['name'])}{$_W['account']['name']}{/if}{if !empty($_W['page']['sitename'])} - {$_W['page']['sitename']}{else}{if IMS_FAMILY != 'x'} - Powered by 012wz.com{/if}{/if}</title>
	<meta name="format-detection" content="telephone=no, address=no">
	<meta name="apple-mobile-web-app-capable" content="yes" /> <!-- apple devices fullscreen -->
	<meta name="apple-touch-fullscreen" content="yes"/>
	<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
	<meta name="keywords" content="{if empty($_W['page']['keywords'])}{if IMS_FAMILY != 'x'}www.zheyitianShi.Com科技,微信,微信公众平台,012wz.com{/if}{else}{$_W['page']['keywords']}{/if}" />
	<meta name="description" content="{if empty($_W['page']['description'])}{if IMS_FAMILY != 'x'}公众平台自助引擎（www.012wz.com），简称www.zheyitianShi.Com科技，www.zheyitianShi.Com科技是一款免费开源的微信公众平台管理系统，是国内最完善移动网站及移动互联网技术解决方案。{/if}{else}{$_W['page']['description']}{/if}" />
	<link rel="shortcut icon" href="{$_W['siteroot']}{$_W['config']['upload']['attachdir']}/{if !empty($_W['setting']['copyright']['icon'])}{$_W['setting']['copyright']['icon']}{else}images/global/wechat.jpg{/if}" />
	<link href="{$_W['siteroot']}app/resource/css/bootstrap.min.css" rel="stylesheet">
	<link href="{$_W['siteroot']}app/resource/css/font-awesome.min.css" rel="stylesheet">
	<link href="{$_W['siteroot']}app/resource/css/animate.css" rel="stylesheet">
	<link href="{$_W['siteroot']}app/resource/css/common.css" rel="stylesheet">
	<link href="{$_W['siteroot']}app/{php echo str_replace('./', '', url('utility/style'))}" rel="stylesheet">
	<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
	<script src="{$_W['siteroot']}app/resource/js/require.js"></script>
	<script src="{$_W['siteroot']}app/resource/js/app/config.js"></script>
	
<link href="../addons/fm_photosvote/template/mobile/photos/main.css?v{php echo time();}" rel="stylesheet">
<link type="text/css" rel="stylesheet" href="../addons/fm_photosvote/template/mobile/photos/dialog1.css">
<link type="text/css" rel="stylesheet" href="../addons/fm_photosvote/template/mobile/photos/style.css">
<link type="text/css" rel="stylesheet" href="../addons/fm_photosvote/template/mobile/photos/gz_tip.css">
<script type="text/javascript" src="../addons/fm_photosvote/template/mobile/photos/js/Tip.js"></script>
<script type="text/javascript" src="../addons/fm_photosvote/template/mobile/photos/js/dialog_min1.js"></script>
<script type="text/javascript">
var config = {
    coverUrl:'', //canvas图片 如果是挂卡图片形式就有图片地址   如果是其他形式则没有图片地址
    swipeCur: 0,
    swipeDir:'horizontal', //滑动图片方向  上下滑动 vertical   左右滑动 horizontal
}
//业务关联链接数组
var ary_biz_jump_id = new Array();
var ary_biz_jump_url = new Array();
</script>
<script src="../addons/fm_photosvote/template/mobile/photos/js/zepto_min.js"></script>
<script src="../addons/fm_photosvote/template/mobile/photos/js/lottery.js"></script>
<script src="../addons/fm_photosvote/template/mobile/photos/js/swipe.js"></script>
<script src="../addons/fm_photosvote/template/mobile/photos/js/player.js"></script>
<script src="../addons/fm_photosvote/template/mobile/photos/js/stackBlur.js"></script>
<script src="../addons/fm_photosvote/template/mobile/photos/js/app.js"></script>
<style>
body{background:#000 no-repeat;  max-width: 640px;  margin: 0 auto;}
.container {
  padding-right: 0;
  padding-left: 0;
  margin-right: auto;
  margin-left: auto;
}
.zongshu {
  color: {if empty($bgarr['bodytextcolor'])}#fff{else}{$bgarr['bodytextcolor']}{/if};
}
.zongshu span{
  color: {if empty($bgarr['bodynumcolor'])}#fff{else}{$bgarr['bodynumcolor']}{/if};
}
.lapiao .l {
  color: {if empty($bgarr['bodytextcolor'])}#fff{else}{$bgarr['bodytextcolor']}{/if};
}
.lapiao .r {
  color: {if empty($bgarr['bodytextcolor'])}#fff{else}{$bgarr['bodytextcolor']}{/if};
}
.lapiao {
  height: 50px;
  background: rgba(0,0,0,0.5);
  position: fixed;
  bottom: 0;
  z-index: 10000;
  max-width: 640px;
  margin: 0 auto;
}
.int {
  padding: 10px 5px;
  width: 100%;
  background: rgba(0,0,0,0.5);
  position: fixed;
  bottom: 0px;
  z-index: 1000;
  display: none;
  max-width: 640px;
  margin: 0 auto;
}
</style>



	<script type="text/javascript">
	if(navigator.appName == 'Microsoft Internet Explorer'){
		if(navigator.userAgent.indexOf("MSIE 5.0")>0 || navigator.userAgent.indexOf("MSIE 6.0")>0 || navigator.userAgent.indexOf("MSIE 7.0")>0) {
			alert('您使用的 IE 浏览器版本过低, 推荐使用 Chrome 浏览器或 IE8 及以上版本浏览器.');
		}
	}
	{php define('HEADER', true);}
	window.sysinfo = {
{if !empty($_W['uniacid'])}
		'uniacid': '{$_W['uniacid']}',
{/if}
{if !empty($_W['acid'])}
		'acid': '{$_W['acid']}',
{/if}
{if !empty($_W['openid'])}
		'openid': '{$_W['openid']}',
{/if}
{if !empty($_W['uid'])}
		'uid': '{$_W['uid']}',
{/if}
		'siteroot': '{$_W['siteroot']}',
		'siteurl': '{$_W['siteurl']}',
		'attachurl': '{$_W['attachurl']}',
{if defined('MODULE_URL')}
		'MODULE_URL': '{MODULE_URL}',
{/if}
		'cookie' : {'pre': '{$_W['config']['cookie']['pre']}'}
	};
	
	// jssdk config 对象
	jssdkconfig = {php echo json_encode($_W['account']['jssdkconfig']);} || {};
	
	// 是否启用调试
	jssdkconfig.debug = false;
	
	jssdkconfig.jsApiList = [
		'checkJsApi',
		'onMenuShareTimeline',
		'onMenuShareAppMessage',
		'onMenuShareQQ',
		'onMenuShareWeibo',
		'hideMenuItems',
		'showMenuItems',
		'hideAllNonBaseMenuItem',
		'showAllNonBaseMenuItem',
		'translateVoice',
		'startRecord',
		'stopRecord',
		'onRecordEnd',
		'playVoice',
		'pauseVoice',
		'stopVoice',
		'uploadVoice',
		'downloadVoice',
		'chooseImage',
		'previewImage',
		'uploadImage',
		'downloadImage',
		'getNetworkType',
		'openLocation',
		'getLocation',
		'hideOptionMenu',
		'showOptionMenu',
		'closeWindow',
		'scanQRCode',
		'chooseWXPay',
		'openProductSpecificView',
		'addCard',
		'chooseCard',
		'openCard'
	];
	
	</script>
	
	<script>
	function _removeHTMLTag(str) {
		if(typeof str == 'string'){
			str = str.replace(/<script[^>]*?>[\s\S]*?<\/script>/g,'');
			str = str.replace(/<style[^>]*?>[\s\S]*?<\/style>/g,'');
			str = str.replace(/<\/?[^>]*>/g,'');
			str = str.replace(/\s+/g,'');
			str = str.replace(/&nbsp;/ig,'');
		}
		return str;
	}
	</script>
	<script type="text/javascript" src="../addons/fm_photosvote/template/mobile/photos/js/main.js?{php echo time()}"></script>

</head>
<body>
<div class="container container-fill">

<div class="container">
    <div class="loading-img">
    	<div id="circular">
            <div id="circular_1" class="circular"></div>
			
			<?php for ($i = 1; $i <= $reply['tpxz']; $i++) {
			$n = $i -1;
			if (!empty($picarr[$n])) {?>
				<div id="circular_{php echo $i+1}" class="circular"></div>
			<?php }} ?>
			
			
            <div class="clearfix"></div>
        </div>
    </div>
    <div class="swipe" id="swipe">
    	<div class="pic_img"><a href="{php echo $this->createMobileUrl('tuser', array('rid'=> $rid, 'tfrom_user' => $tfrom_user))}" ><img src="{php echo toimage($user['avatar'])}"></a></div>
    	<div class="zongshu"> {if empty($user['realname'])}{php echo cutstr($user['nickname'], '6')}{else}{php echo cutstr($user['realname'], '6')}{/if} {$reply['tpsname']}：<span>{php echo $user['photosnum'] + $user['xnphotosnum']} </span></div>
        <div class="tanmu" id="tanmu">
        	<span class="yuan"></span>
           <div class="tm">弹幕</div>
        </div>
       
        <ul>
			
				<li {if empty($_GPC['ti'])}class="cur"{/if}><div style="background-image: url({php echo toimage($user['photo'])})"></div></li>
				
				<?php for ($i = 1; $i <= $reply['tpxz']; $i++) {
				$n = $i -1;
				if (!empty($picarr[$n])) {
				?>        	
					<li {if !empty($_GPC['ti']) && $i == $_GPC['ti']}class="cur"{/if}><div style="background-image: url({php echo toimage($picarr[$n])})"></div></li>				
				<?php }} ?>	
			
			 	
        </ul>
    </div>
    <div id="arrowV" class="arrow_v f-hide"><p></p></div>
    <div id="arrowH" class="arrow_h f-hide">
        <span class="arrow_l"></span>
        <span class="arrow_r"></span>
    </div>
    <div class="lottery" id="lottery"></div>
    <div class="download_mask" id="downloadMask"><i></i></div>
</div>
<div class="lapiao">
	<a href="{php echo $this->createMobileUrl('tuser', array('rid'=> $rid, 'tfrom_user' => $tfrom_user))}" class="l">详情模式</a>
	{if !empty($reply['lapiao'])}<em class="r" onclick="button2()">{$reply['lapiao']}</em>{/if}
    <div id="mcover" onclick="weChat()" style="display:none;">
            <img src="../addons/fm_photosvote/template/mobile/photos/guide.png">
    </div>
	{if $uallonetp >= $reply['allonetp']}
		<a href="Javescript::;"> <div class="addl" id="id"><div class="i"><i><img src="../addons/fm_photosvote/template/mobile/photos/xin.png"></i>已投</div><span class="jia">+1</span></div></a>
		
	{else}	
		{if $udayonetp >= $reply['dayonetp']}							
			<a href="Javescript::;"> <div class="addl" id="id"><div class="i"><i><img src="../addons/fm_photosvote/template/mobile/photos/xin.png"></i>已投</div><span class="jia">+1</span></div></a>
		{else}	
			 <a href="javascript:void(0)" data-toggle="tooltip" data-placement="top" onclick="tvote()"> <div class="addl" id="id"><div class="i"><i><img src="../addons/fm_photosvote/template/mobile/photos/xin.png"></i>投票</div><span class="jia">+1</span></div></a>
					
		{/if}								
	{/if}
	
</div>

<div class="con_tm">
    <div id="tangmu">
         
    </div>
</div>
<div class="int" id="int">
	<input type="text" id="int_txt" class="int_txt" />
    <input type="button" class="int_btn" id="int_btn" value="发表" />
</div>
<div class="hua"><i></i><i></i><i></i> 左右滑动 <i></i><i></i><i></i></div>



{template 'tvote'}
<script type="text/javascript">
var iscode = "{$reply['iscode']}";	

$('#atten_shade').live('click', function() {
 $('#atten_shade').remove();
})


document.ontouchstart = function(){
	$('.hua').fadeOut(0)
}

$('#text').blur(function(){
	$('.swipe').css('top','0px')	
	$('.swipe li').css('top','0px')	
})
$('#tanmu').bind('click',function(){
		$('.add,.addl').find('i img').removeClass('changesize')	
		$('.add,.addl').find('span').removeClass('jiayi')	
	if($(int).is(':hidden')){
		$('.tanmu').css({background : '#ef1e6f',padding:'0 0 0 5px'}).children('.yuan').css('float','right')
		$('.lapiao').hide()
		$('.int').show()
		tanmuAjax();
	}else{
		$('.tanmu').css({background : '#979797',padding:'0'}).children('.yuan').css('float','left')
		$('.lapiao').show()
		$('.int').hide()
		$('.floatTxt').remove()
		clearInterval(TIMER)
		clearInterval(TIMER2)
	}
});


function tanmuAjax(){
	$.ajax({
		type:'post',
		url:'{php echo $this->createMobileUrl('tbbs')}',
		data:{rid:"{$rid}",tfrom_user:"{$tfrom_user}",from_user:"{$from_user}",msgstr:$(".txte").val()},
		success:function(data){
			if(data!=''){
				
			
				var data = eval('('+data+')');
				
				var i=0;
				function tanmuStart(data){
					createDiv(data[i]);
					i++;
					if(i==data.length){
						clearInterval(TIMER);
						TIMER2 = setTimeout('tanmuAjax()',2000)
					}	
				}
				if(data.length<=10){
					tanmuStart(data)
					TIMER = setInterval(function(){
						tanmuStart(data)
					},5000)
				}else{
					tanmuStart(data)
					TIMER = setInterval(function(){
						tanmuStart(data)
					},300)
				}
			}	
		}
	})	
}


		var magazine_id = '11999';
		function randomString(len) {
		　　len = len || 32;
		　　var $chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678';    /****默认去掉了容易混淆的字符oOLl,9gq,Vv,Uu,I1****/
		　　var maxPos = $chars.length;
		　　var pwd = '';
		　　for (i = 0; i < len; i++) {
		　　　　pwd += $chars.charAt(Math.floor(Math.random() * maxPos));
		　　}
		　　return pwd;
		}
		//设置cookie
		function setCookie(name,value,time)
		{
			var strsec = time*1000; // 毫秒
			var exp = new Date();
			exp.setTime(exp.getTime() + strsec);
			document.cookie = name + "="+ escape (value) + ";expires=" + exp.toGMTString();
		}
		//读取cookies
		function getCookie(name)
		{
			var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)");
		
			if(arr=document.cookie.match(reg))
		
				return (arr[2]);
			else
				return null;
		}
		function getFmoonsId() {
			var magazine_fmoons_id = getCookie('magazine_fmoons_id'+magazine_id);
			if(!magazine_fmoons_id) {
				magazine_fmoons_id = randomString(32);
				setCookie('magazine_fmoons_id'+magazine_id, magazine_fmoons_id, 86400*100);
			}
			return magazine_fmoons_id;
		}

		function convertBizUrl() {
			if(ary_biz_jump_id.length > 0) {

				
				var pid = '{$user['id']}';
				var fmoons_id = getFmoonsId();
				var i = 0;
				for(i; i<ary_biz_jump_id.length;i++) {
					var url = ary_biz_jump_url[i];
					//判断是否是老活动逻辑
					if(-1 == url.indexOf('Webexam') && (-1 == url.indexOf('BigWeel'))) {
						break;
					}

					if(-1 != url.indexOf('BigWeel') && pid == '{$user['id']}') {
						var new_url = url.replace('fromUsername', fmoons_id);
						document.getElementById(ary_biz_jump_id[i]).href = new_url;
					}

					if(-1 != url.indexOf('Webexam')) {
						var new_url = url.replace('fromUsername', fmoons_id);
						document.getElementById(ary_biz_jump_id[i]).href = new_url;
					}
				}
			}

		}
		
//弹幕
function addEvent(obj,sEv,fn){
	if(obj.addEventListener){
		obj.addEventListener(sEv,fn,false);	
	}else{
		obj.attachEvent('on'+sEv,fn);	
	}	
}
$(document).delegate('#int_btn','click',function(){
	var $txt = $('#int_txt');
	createDiv($txt.val());
	var content = $('#int_txt').val();
	if(content == '' || content == null) {
		fminfo("请输入内容！");
		return false;
	}
	var bbstype = "tuserphotos";
	bbsreply(content, iscode, bbstype);
	/**$.ajax({
		type:'post',
		type:'post',url:'{php echo $this->createMobileUrl('Tbbsreply')}',
		data:{tmreply:"{$reply['tmreply']}",rid:"{$rid}",tfrom_user:"{$tfrom_user}",from_user:"{$from_user}",msgstr:$(".int_txt").val()},
		success:function(){}	
	})**/
	$txt.val('');
	setInterval(function(){
		$('.floatTxt').each(function(){
			if(parseInt($(this).css('left'))<=-320){
				$(this).remove();	
			}	
		})	
	},5000)
	
})
function createDiv(txt){
	var oDiv = document.createElement('div');
	oDiv.className = 'floatTxt';
	oDiv.innerHTML = txt;
	$('body').append(oDiv);
	var h = $('.container').height();
	$(oDiv).css({'left':'-320px','color':'rgb('+rnd(0,255)+','+rnd(0,255)+','+rnd(0,255)+')','top':rnd(0,h-100)+'px','fontSize':rnd(12,23)+'px'});
	oDiv.addEventListener('touchstart',function(event){
		event.preventDefault();
		return false;
	})	
	oDiv.addEventListener('touchmove',function(event){
		event.preventDefault();
		return false;
	})	
	oDiv.addEventListener('touchend',function(event){
		event.preventDefault();
		return false;
	})
}
function rnd(n,m){ //随机数字
	return parseInt(Math.random()*(m-n+1))+n
}
var vote = {
	iNow:0,
	arr:[],
	fontHtml:'',
	oId:''	,
	oName:''	
}

</script>


{template 'footer'}
